package com.example.springboot_admin.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author svblack
 * @since 2024-09-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("posts")
public class Posts implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "post_id", type = IdType.AUTO)
    private Integer post_id;

    @TableField("user_id")
    private Integer user_id;

    @TableField("title")
    private String title;

    @TableField("content")
    private String content;

    @TableField("image_url")
    private String image_url;

    @TableField("publish_time")
    private LocalDateTime publish_time;
    public Posts() {}

    public Posts(String title, String content, String imageUrl) {
        this.title = title;
        this.content = content;
        this.image_url = imageUrl;
    }

}
